        insert into  asm_morosi_poste_1
       select so.sog_id from 
       --        (SELECT CSI_IDCLI,SUM(NVL(SCR_IMP_D,0))-SUM(NVL(SCR_IMP_A,0)) T
--
         --      FROM V_SCRITTURADEST_EC
       --       where 
            --  0<> ^ANNO FATTURAZIONE DA aaaa;N;NUMERICO^^
            --   and to_number(to_char(mov_dt,'yyyy')) <= ^ANNO FATTURAZIONE  A aaaa;N;NUMERICO^^
              -- GROUP BY CSI_IDCLI) x,
               soggetto so
       where
       so.az_id='01'
     
        and so.sog_id not in (select sog_id from asm_morosi_poste)
       -- and so.sog_id = 8851683
        AND so.sog_id not in (select utente from asm_morosi_poste_excel)
         AND sog_id not in (select sog_id from asm_morosi_poste_2)
    
        
        and  so.sog_id not in (select sog_id from v_ragfat where az_id='01'  and gf_id IN( 200,105)
       and sta_idsys= 2 and ver_dtfine = to_date('31/12/9999','dd/mm/yyyy'))
                
                                                    

               